package com.cbs.android.module.shit.sample;

import android.app.Application;

import com.cbs.android.component.applicationutils.Global;
import com.cbs.android.component.push.pushinterface.LocalNotification;
import com.cbs.android.component.push.pushinterface.PushHandler;
import com.cbs.android.component.push.pushinterface.PushInterface;
import com.cbs.android.component.sms.smsinterface.SmsHandler;
import com.cbs.android.component.sms.smsinterface.SmsInterface;
import com.cbs.android.component.toast.Toast;
import com.cbs.android.module.shit.ShitModule;
import com.cbs.android.module.user.user.UserModule;
import com.cbs.component.android.storage.storageinterface.StorageHandler;
import com.cbs.component.android.storage.storageinterface.StorageInterface;

import java.io.File;
import java.util.Hashtable;

/**
 * Created by broche on 28/11/2016.
 */

public class MyApplication extends Application {
    @Override
    public void onCreate() {
        super.onCreate();

        Global.setAppId(1);
        Global.init(this);
        Global.setServerHost("http://192.168.58.12:82");

        UserModule.init(this, new SmsInterface() {
            @Override
            public void getVerifyCode(String s, SmsHandler smsHandler) {

            }
        }, new PushInterface() {
            @Override
            public void addPushHandler(PushHandler pushHandler) {

            }

            @Override
            public void addLocalNotification(LocalNotification localNotification) {

            }

            @Override
            public void clearLocalNotification() {

            }

            @Override
            public void removeLocalNotification(long l) {

            }
        }, new StorageInterface() {
            @Override
            public String upload(String s, String s1, String s2, Hashtable<String, String> hashtable, byte[] bytes, StorageHandler storageHandler) {
                return null;
            }

            @Override
            public String upload(String s, String s1, String s2, Hashtable<String, String> hashtable, File file, StorageHandler storageHandler) {
                return null;
            }

            @Override
            public String upload(String s, String s1, Hashtable<String, String> hashtable, byte[] bytes, StorageHandler storageHandler) {
                return null;
            }

            @Override
            public String upload(String s, String s1, Hashtable<String, String> hashtable, File file, StorageHandler storageHandler) {
                return null;
            }

            @Override
            public void cancel(String s) {

            }
        });
        UserModule.setDebug(false);

        ShitModule.setDebug(false);
        ShitModule.setInterval(2000);

        Toast.init(this);
    }

}
